import Home from '@/auth/pages/Home'
import Work from '@/auth/pages/Work'
// 引入模块module（相当于页面上的一个顶级菜单）
// 系统管理
import systemModule from './modules/system'
// 机构管理模块
import organizationModule from './modules/organization'
// 标准库
import standardLibraryModule from './modules/standard-library'
//项目管理
import projectManagementModule from './modules/project-management'
// 信息查询
import informationModule from './modules/information'
//风险源库
import riskSourceLibraryModule from './modules/risk-source-library'
//台账查询
import ledgerQueryModule from './modules/ledger-query'

// 辨识评估
import identificationAssessmentModule from './modules/identification-assessment'

//评估消号
import evaluationNumber from './modules/evaluation-number'
//动态管控
import dynamicControlModule from './modules/dynamic-control'
//措施方案
import measurePlanModule from './modules/measure-plan'

//统计分析
import statisticalAnalysis from './modules/statistical-analysis'

//消息管理
import messageManage from './modules/message-manage'

const routes = [
  {
    path: '/login',
    name: 'login',
    meta: {
      title: '登录',
      hideInMenu: true
    },
    component: () => import('@/auth/pages/Login.vue')
  },
  {
    path: '/bi',
    name: 'bi',
    meta: {
      title: 'bi看板',
      hideInMenu: true
    },
    component: () => import('@/auth/pages/BI.vue')
  },
  {
    path: '/work',
    name: 'work',
    meta: {
      title: '工作台',
      hideInMenu: true
    },
    component: () => import('@/auth/pages/Work.vue')
  },
  {
    path: '/',
    name: '_home',
    redirect: '/home',
    component: Home,
    meta: {
      hideInMenu: true,
      notCache: true
    },
    children: [
      {
        path: '/home',
        name: 'home',
        meta: {
          hideInMenu: false,
          title: '欢迎页',
          notCache: true,
          icon: 'md-home'
        },
        component: () => import('&/index/main')
      }
    ]
  },
  // 模块module
  systemModule,
  organizationModule,
  standardLibraryModule,
  projectManagementModule,
  informationModule,
  riskSourceLibraryModule,
  ledgerQueryModule,
  identificationAssessmentModule,
  evaluationNumber,
  dynamicControlModule,
  measurePlanModule,
  statisticalAnalysis,
  messageManage,
  {
    path: '*',
    name: 'error_404',
    meta: {
      hideInMenu: true,
      title: '错误页面'
    },
    component: () => import('&/error-page/404.vue')
  }
]

export default routes
